<template>
	<view :class="pageClass" :style="pageStyle" v-if="pageReady">
			<moxi-nav :set="navSet"></moxi-nav> 
			
			<view style="margin: 10px;">
				<view class="form-list" >
					<text class="text_title"><text style="color: red;">* </text>联系姓名：</text>
					<u--input
					  placeholder="请输入您的姓名"
					  border="surround"
					  clearable
					  v-model="info.name"
					></u--input>
				</view>
				<view class="form-list" >
					<text class="text_title"><text style="color: red;">* </text>联系电话：</text>
					<u--input
					  placeholder="请输入您的手机号码"
					  border="surround"
					  type='number'
					  clearable
					  v-model="info.phone"
					></u--input>
				</view>
				<view class="form-list" >
					<text class="text_title">联系邮箱：</text>
					<u--input
					  placeholder="请输入您的邮箱地址"
					  border="surround"
					  clearable
					  v-model="info.email"
					></u--input>
				</view>
				<view class="form-list" >
					<text class="text_title"><text style="color: red;">* </text>留言内容：</text>
					<u--textarea v-model="info.content"  border="surround" placeholder="请输入内容" ></u--textarea>
				</view>
				<u-button text="提交留言" :color="app_color" @click="save()"></u-button>
			</view>
			
			<moxi-tabbar :set="tabbar" v-if="tabbar.index_id"></moxi-tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:{
					name:'',
					email:"",
					phone:"",
					captcha:"",
					content:""
				},
			
					
			}
		},
		methods: {
			save:function(){
				let self = this;
				this.moxiPost('/index/tools/message',this.info,function(data){
					self.msg(data.hint)
				})
			}
		}
	}
</script>

<style>
.msg-box{display: flex;flex-direction: column;}
.form-list{display: flex;flex-direction: column;margin-bottom: 10px;}
.form-list .text_title{font-size: 14px;color: #666666;margin-bottom: 5px;;}
.form-list .desc{font-size: 12px;color: #666}
</style>
